import javax.swing.*;
import java.awt.*;
import java.text.spi.BreakIteratorProvider;

/**
 * 提示对方上轮做出的行动(出牌、过回合)的类
 */
public class RivalActionJlabel {
    static JLabel RAction = new JLabel();
   static String RivalAction = "";
   static void Init(){
       RAction.setVisible(true);
       RAction.setHorizontalAlignment(SwingConstants.CENTER);
       RAction.setBounds(80,720,250,40);
       RAction.setText(" ");
       Font font = new Font(null,Font.BOLD,25);
       RAction.setForeground(Color.blue);
       RAction.setFont(font);
   }

    /**
     * 设置对方行动
     * @param s 对方行动
     */
    public static void setRivalAction(String s){
        RAction.setVisible(true);
        RivalAction = "对方 "+s;
        RAction.setText(RivalAction);
        RAction.repaint();
    }

    /**
     * 设置可视化
     * @param f 是否显示
     */
    public static void setRActionVisible(boolean f){
        RAction.setVisible(f);
    }
}
